import 'reflect-metadata'
class Myclass {
    private myProperty: string;
    constructor(value: string){
        this.myProperty = value
    }
    @Reflect.metadata('customkey', 'customvalue')
    myMethod(){
        console.log('ex my')
    }
}
const instance = new Myclass('hello')
Reflect.defineMetadata('key1','value1',instance, 'myProperty')

const hasMetadata = Reflect.hasMetadata('key1', instance, 'myProperty')

console.log('hasMetadata', hasMetadata)
const metadataValue = Reflect.getMetadata('key1', instance, 'myProperty')
console.log('metadataValue', metadataValue)
const own = Reflect.getOwnMetadata('customkey', Reflect.getPrototypeOf(instance), 'myMethod')
console.log('own', own)
const own1 = Reflect.getMetadata('customkey', instance, 'myMethod')
console.log('own1', own1)
console.log('Myclass', Myclass.prototype)

Reflect.deleteMetadata('key1', instance, 'myProperty')

const deleteMetadata = Reflect.hasMetadata('key1', instance, 'myProperty')
console.log('deleteMetadata', deleteMetadata)